﻿/**
 * @name umi 的路由配置
 * @description 只支持 path,component,routes,redirect,wrappers,name,icon 的配置
 * @param path  path 只支持两种占位符配置，第一种是动态参数 :id 的形式，第二种是 * 通配符，通配符只能出现路由字符串的最后。
 * @param component 配置 location 和 path 匹配后用于渲染的 React 组件路径。可以是绝对路径，也可以是相对路径，如果是相对路径，会从 src/pages 开始找起。
 * @param routes 配置子路由，通常在需要为多个路径增加 layout 组件时使用。
 * @param redirect 配置路由跳转
 * @param wrappers 配置路由组件的包装组件，通过包装组件可以为当前的路由组件组合进更多的功能。 比如，可以用于路由级别的权限校验
 * @param name 配置路由的标题，默认读取国际化文件 menu.ts 中 menu.xxxx 的值，如配置 name 为 login，则读取 menu.ts 中 menu.login 的取值作为标题
 * @param icon 配置路由的图标，取值参考 https://ant.design/components/icon-cn， 注意去除风格后缀和大小写，如想要配置图标为 <StepBackwardOutlined /> 则取值应为 stepBackward 或 StepBackward，如想要配置图标为 <UserOutlined /> 则取值应为 user 或者 User
 * @doc https://umijs.org/docs/guides/routes
 */
export default [
  {
    path: '/broadcast/broadcast_index',
    layout: false,
    component: './BroadcastManagement/Broadcast_index',
  },
  {
    path: '/broadcast/broadcast_audience_index',
    layout: false,
    component: './BroadcastManagement/Broadcast_audience_index',
  },
  {
    path: '/broadcast/broadcast_share',
    layout: false,
    component: './BroadcastManagement/Broadcast_share',
  },
  {
    path: '/h5_agreement/privacy_policy',
    layout: false,
    component: './H5_Agreement/PrivacyPolicy',
  },
  {
    path: '/h5_agreement/term_of_service',
    layout: false,
    component: './H5_Agreement/TermOfService',
  },
  {
    path: '/h5_familysickbed/jianhu_hospital',
    layout: false,
    component: './H5_Familysickbed/JianhuHospital',
  },
  {
    path: '/guide/my_guide/video',
    layout: false,
    component: './GuideManagement/Video',
  },
  {
    path: '/guide/my_guide/audio',
    layout: false,
    component: './GuideManagement/Audio',
  },
  {
    path: '/guide/my_guide/remote_video',
    layout: false,
    component: './GuideManagement/RemoteVideo',
  },
  {
    path: '/big_data_screen',
    layout: false,
    component: './BigDataScreen',
  },
  {
    path: '/family_bed_screen',
    layout: false,
    component: './FamilyBedScreen',
  },
  {
    path: '/familySickbeds/EstablishedSickbeds/audio',
    layout: false,
    component: './FamilySickbeds/Audio'
  },
  {
    path: '/familySickbeds/EstablishedSickbeds/video',
    layout: false,
    component: './FamilySickbeds/Video'
  },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    path: '/login',
    layout: false,
    component: './Login',
  },
  {
    path: '/welcome',
    name: '首页',
    icon: 'smile',
    component: './Welcome',
    // access: 'welcome',
  },
  {
    path: '/patient',
    name: '患者管理',
    icon: 'SolutionOutlined',
    access: 'patient',
    routes: [
      {
        path: '/patient/allpatient',
        name: '全部患者',
        component: './PatientManagement/AllPatient',
        access: 'allpatient',
      },
      {
        path: '/patient/mypatient',
        name: '我的患者',
        component: './PatientManagement/MyPatient',
        access: 'mypatient',
      },
      {
        path: '/patient/subordinate_patients',
        name: '下属机构患者',
        component: './PatientManagement/SubordinatePatients',
        access: 'subordinate_patients',
      },
    ],
  },
  {
    path: '/familySickbeds',
    name: '家庭病床',
    icon: 'ProfileOutlined',
    access: 'familySickbeds',
    routes: [
      {
        path: '/familySickbeds/EstablishedSickbeds',
        name: '已建病床',
        component: './FamilySickbeds/EstablishedSickbeds',
        access: 'establishedSickbeds',
      },
      {
        path: '/familySickbeds/mySickbeds',
        name: '我负责的',
        component: './FamilySickbeds/MySickbeds',
        access: 'mySickbeds',
      },
      {
        path: '/familySickbeds/bedApplication',
        name: '建床申请',
        component: './FamilySickbeds/BedApplication',
        access: 'bedApplication',
      },
      {
        path: '/familySickbeds/callReminder',
        name: '呼叫提醒',
        component: './FamilySickbeds/CallReminder',
        access: 'callReminder',
      }
    ]
  },
  {
    path: '/broadcast',
    name: '直播管理',
    icon: 'VideoCameraOutlined',
    access: 'broadcast',
    routes: [
      {
        path: '/broadcast/plan',
        name: '直播计划',
        component: './BroadcastManagement/Broadcast_plan',
        access: 'plan',
      },
      {
        path: '/broadcast/manage',
        name: '直播管理',
        component: './BroadcastManagement/Broadcast_manage',
        access: 'manage',
      },
      {
        path: '/broadcast/history',
        name: '历史直播',
        component: './BroadcastManagement/Broadcast_history',
        access: 'history',
      },
    ],
  },
  {
    path: '/institution',
    name: '关联机构',
    icon: 'UserAddOutlined',
    access: 'institution',
    routes: [
      {
        path: '/institution/association',
        name: '关联机构',
        component: './RelatedInstitutions/AssociationInstitution',
        access: 'association',
      },
      {
        path: '/institution/examine',
        name: '机构关联审批',
        component: './RelatedInstitutions/ExamineApprove',
        access: 'examine',
      },
      {
        path: '/institution/unbind',
        name: '解绑记录',
        component: './RelatedInstitutions/UnbindRecord',
        access: 'unbind',
      },
    ],
  },
  {
    path: `https://chronic-desease-manage.limaoniao.com.cn`,
    name: '慢病管理',
    icon: 'ContactsOutlined',
    access: 'chronic_diseases'
  },
  {
    path: '/guide',
    name: '指导管理',
    icon: 'PhoneOutlined',
    access: 'guide',
    routes: [
      {
        path: '/guide/guide_plan',
        name: '指导计划',
        component: './GuideManagement/GuidePlan',
        access: 'guide_plan',
      },
      {
        path: '/guide/my_guide',
        name: '我的指导',
        component: './GuideManagement/MyGuide',
        access: 'my_guide',
      },
      {
        path: '/guide/guide_record',
        name: '指导记录',
        component: './GuideManagement/GuideRecord',
        access: 'guide_record',
      },
    ],
  },
  {
    path: '/becovery_manage',
    name: '康复管理',
    icon: 'MedicineBoxOutlined',
    access: 'becovery_manage',
    routes: [
      {
        path: '/becovery_manage/becovery_assessment',
        name: '康复评估',
        component: './BecoveryManage/Becovery_assessment',
        access: 'becovery_assessment',
      },
      {
        path: '/becovery_manage/assessment_record',
        name: '评估记录',
        component: './BecoveryManage/Assessment_record',
        access: 'assessment_record',
      },
      {
        path: '/becovery_manage/video_manage',
        name: '视频管理',
        component: './BecoveryManage/Video_manage',
        access: 'video_manage',
      },
    ],
  },
  {
    path: '/devices',
    name: '设备管理',
    icon: 'ToolOutlined',
    access: 'devices',
    routes: [
      {
        path: '/devices/monitor_devices',
        name: '监测设备',
        component: './DevicesManage/MonitorDevices',
        access: 'monitor_devices',
      },
      {
        path: '/devices/monitoring_equipment',
        name: '监护设备',
        component: './DevicesManage/MonitoringEquipment',
        access: 'monitoring_equipment',
      },
    ]
  },
  {
    path: '/system',
    name: '系统设置',
    icon: 'UserOutlined',
    access: 'system',
    routes: [
      {
        path: '/system/department',
        name: '科室管理',
        component: './SystemSettings/DepartmentManagement',
        access: 'department',
      },
      {
        path: '/system/role',
        name: '角色权限',
        component: './SystemSettings/RolePermission',
        access: 'role',
      },
      {
        path: '/system/staff',
        name: '员工管理',
        component: './SystemSettings/StaffManagement',
        access: 'staff',
      },
    ],
  },
  {
    path: '*',
    layout: false,
    component: './404',
  },
];
